package com.ricchieri.model;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

public class Documentation extends BaseEntity {
	private static final long serialVersionUID = -7949305794979159545L;
	
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contentType", nullable = false)
	private String contentType;
	
	@Column(name="data", nullable=false)	
	private byte[] data;
	
	@Column(name="description", nullable=false, length=500)	
	private String description;
	
	@Column(name="fileName", nullable=false, length=50)	
	private String fileName;
	
	@Column(name="fileName", nullable=false)	
	private long fileSize;
	
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "emailToSend", nullable = false)	
	private EmailToSend emailToSend;
	
	public String getContentType() {
		return contentType;
	}
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	public byte[] getData() {
		return data;
	}
	public void setData(byte[] data) {
		this.data = data;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public long getFileSize() {
		return fileSize;
	}
	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}
	public EmailToSend getEmailToSend() {
		return emailToSend;
	}
	public void setEmailToSend(EmailToSend emailToSend) {
		this.emailToSend = emailToSend;
	}

}